package com.lingkang.usersso.controller;

import com.lingkang.usersso.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author linke
 * @date 2020-02-05 下午 15:40
 * @description
 */
@Controller
public class WebController {
    @Autowired
    private SystemService systemService;

    @GetMapping("login")
    public String login() {
        return "login";
    }

    @GetMapping("toLogin")
    public String toLogin() {
        return "toLogin";
    }

    @GetMapping(value = {"", "index"})
    public String index() {
        return "redirect:/user/index";
    }

    @GetMapping("systemInfo")
    @ResponseBody
    public Object systemInfo(){
        return systemService.systemInfo();
    }

}
